Mule : Using Multiple Configuration Files
This page last changed on Nov 16, 2005 by rossmason.
Mule Xml configuration files can get large so you can split the configuration into multiple files. A common scheme for doing this is to have all the global configuration in one file and each of the components configuration in its own file. In the global configuration file you should specify a <model> element but exclude any <mule-descriptor> elements. Then for each component (or logical group of components) you can specify the configuration file as - <mule-configuration> <mule-descriptor name="component1" inboundEndpoint="jms://component1" outboundEndpoint="jms://component2" implementation="com.foo.Component1"> </mule-descriptor> </mule-configuration> Note that the first element in the file must be <mule-configuration>. To use the configuration files from a script use the following - java -cp ... org.mule.MuleServer -config ../conf/mule-config.xml, ../conf/mule-component1-config.xml,../conf/mule-component2-config.xml The equivilent in code would be - MuleXmlConfigurationBuilder builder = new MuleXmlConfigurationBuilder(); String configs="../conf/mule-config.xml,../conf/mule-component1-config.xml, ../conf/mule-component2-config.xml"; builder.configure(configs); The configuration files are loaded in sequences so global configuration files should be loaded first. |
Document generated by Confluence on Nov 27, 2006 10:27 |